home *** CD-ROM | disk | FTP | other *** search
- global gMyMessage, gCharToNumList, gCharColorList, gMessageLength, gIterCount, gStopFlag, gMyWindow
-
- on mouseUp
- set gMyMessage to the text of field "Message"
- set gCharColorList to [225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225]
- repeat with i = 1 to the number of chars in gMyMessage
- set theColor to the foreColor of char i of field "Message"
- if theColor = 255 then
- set theColor to 225
- end if
- append(gCharColorList, theColor)
- end repeat
- repeat with i = 1 to 35
- append(gCharColorList, 255)
- end repeat
- set gMyMessage to " " & gMyMessage & " "
- set gCharToNumList to []
- cursor(4)
- repeat with y = 1 to the number of chars in gMyMessage
- set myCharToNum to the number of member char y of gMyMessage
- add(gCharToNumList, myCharToNum)
- end repeat
- cursor(-1)
- set gMessageLength to the number of chars in gMyMessage
- set gIterCount to 0
- if gStopFlag then
- tell gMyWindow
- go("WriteNStop")
- end tell
- else
- tell gMyWindow
- go("Write Message")
- end tell
- end if
- go("Run")
- end
-